document.getElementById('save').addEventListener('click', () => {
  const apiKey = document.getElementById('apiKey').value;
  chrome.storage.local.set({ deepseekApiKey: apiKey }, () => {
    document.getElementById('status').textContent = 'API密钥已保存';
  });
});

chrome.storage.local.get('deepseekApiKey', (data) => {
  document.getElementById('apiKey').value = data.deepseekApiKey || '';
}); 